[Files] Add user ID to file#144026
Conversation
|
Pinging @elastic/kibana-app-services (Team:AppServicesUx) |
created_by field
created_by field| alt, | ||
| meta, | ||
| mime: mimeType, | ||
| owner: security?.authc.getCurrentUser(req)?.username, |
There was a problem hiding this comment.
I am not 100% sure that just username is enough to identify the user, as I saw this in the search code:
kibana/src/plugins/data/common/search/session/types.ts
Lines 53 to 58 in 7a3243b
I'd ask @elastic/kibana-security for a review if we haven't already
There was a problem hiding this comment.
This is a good point @Dosant . We reached out to security team and they advised us to use profile_uid. Changes incoming.
| * for searching and filtering. | ||
| */ | ||
| Meta?: Meta; | ||
| Meta?: Meta & FileSystemMetadata; |
There was a problem hiding this comment.
This was added to the Meta field because I was running into the 1000 fields upper limit for the SO index
Happy to use the regular declaration for new fields, but since we already have a flattened field that kind of fits this use case, I pivoted the implementation to use that instead. cc @vadimkibana
There was a problem hiding this comment.
Also notified core about this limit being hit in our functional tests
There was a problem hiding this comment.
A there any downsides of storing it under meta? Are these still searchable/aggregatable / filterable?
Here is a list of the downsides: https://www.elastic.co/guide/en/elasticsearch/reference/master/flattened.html#supported-operations The fields are essentially the same as "keyword" fields which for usernames and user IDs should work quite well. |
|
The problems of putting those fields in
For profile ID, ideally we would use |
* main: Upgrade @elastic/makelogs from v6.0.0 to v6.1.1 (elastic#144231) [Files] move to src (elastic#144044) [Synthetics UI] Add pagination and date filtering to test runs table (elastic#144029) Update time range when opening timeline from Entity Analytics page (elastic#144024) [Security Solution] Added guided onboarding for the rules area (elastic#144016)
* main: (43 commits) [Synthetics] Step details page screenshot (elastic#143452) [Lens] Datatable expression types improvement. (elastic#144173) [packages/kbn-journeys] start apm after browser start and stop after browser is closed (elastic#144267) [Files] Make files namespace agnostic (elastic#144019) Implement base browser-side logging system (elastic#144107) Correct wrong multiplier for byte conversion (elastic#143751) [Monaco] Add JSON syntax support to the Monaco editor (elastic#143739) CCS Smoke Test for Remote Clusters and Index Management (elastic#142423) [api-docs] Daily api_docs build (elastic#144294) chore(NA): include progress on Bazel tasks (elastic#144275) [RAM] Allow users to see event logs from all spaces they have access to (elastic#140449) [APM] Show recommended minimum size when going below 5 minutes (elastic#144170) [typecheck] delete temporary target_types dirs in packages (elastic#144271) [Security Solution][Endpoint] adds new alert loading utility and un-skip FTR test for endpoint (elastic#144133) [performance/journeys] revert data_stress_test_lens.ts journey step (elastic#144261) [TIP] Use search strategies in Threat Intelligence (elastic#143267) Optimize react-query dependencies (elastic#144206) [babel/node] invalidate cache when synth pkg map is updated (elastic#144258) [APM] AWS lambda estimated cost (elastic#143986) [Maps] layer group wizard (elastic#144129) ...
thomheymann
left a comment
There was a problem hiding this comment.
Nice one, looks great and is consistent with ECS / naming convention in audit log!
💚 Build Succeeded
Metrics [docs]Saved Objects .kibana field count
Unknown metric groupsAPI count
ESLint disabled in files
ESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Screenshot
userflattened field to the base files metadata. This containsidandname.Blocked by: #144272
Checklist